<?php
// no direct access
defined('_JEXEC') or die('Restricted access');

//require_once('js/bootstrap/bootstrap.php');
//$bootstrap = new Bootstrap();
//$bootstrap->load('css','bootstrap.min');
?>
<link rel="stylesheet" href="js/colorbox/colorbox.css">
<style type="text/css">
.cbox_cover h3{
    color: #7BA566;
    font-size: 20px;
}
.cbox_cover h1.danger{
    color: red;
}
</style>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/colorbox/jquery.colorbox.js"></script>
<script type="text/javascript">
jQuery.noConflict();
(function($) {
$(function() {
    // more code using $ as alias to jQuery
    $(".inline").colorbox({
        inline:true,
        width:"50%",
        opacity: "0.65",
        transition: "none"
    });
});
})(jQuery);
</script>

<?php
for ($i=0, $m=count( $rs ); $i < $m; $i++)
{
    $rows =&$rs[$i];
    $user_link = '';
    if($rows->link != ""){
        $user_link = JRoute::_( $rows->link . '&Itemid=' . $rows->id );
    }
    if($rows->access >= 1){
        if($lft >= "8" && $lft < "14" && $rows->access < 2 ){
            echo '<a href="'.$user_link.'" title="'.$rows->name.'" >'.$rows->name.'</a><br />';
        }else if($lft >= "14"){
            echo '<a href="'.$user_link.'" title="'.$rows->name.'" >'.$rows->name.'</a><br />';
        }
    }else{
        echo '<a href="'.$user_link.'" title="'.$rows->name.'" >'.$rows->name.'</a><br />';
    }
}

?>
<a class="inline cboxElement" href="#inline_content">Account Details</a>
<div style="display:none">
    <div class="cbox_cover" id="inline_content" style="padding:10px; background:#ffffff; text-align: center;">
        <h3>
            <span><?php echo JText::_('Account Details')?></span>
        </h3>
        <?php
        
        if($obj===FALSE)
        {
            echo '<h1 class="danger">'.JText::_('Please contact support@officeability.com for more detail.').'</h1>';
        }
        else
        {
            list($min_users, $max_users) = explode('-', $users->intranet_users);
            $max_users = Intval($max_users);
            $available = $max_users - $amount;
$details = <<<EOF
<p><strong>Account User limit:</strong> {$max_users}</p>
<p><strong>Number of Users:</strong> {$amount}</p>
<p><strong>Available:</strong> {$available}</p>
<button>Upgrade Account</button>
<h1 class="danger">'.JText::_('Please contact support@officeability.com for more detail.').'</h1>
EOF;
echo $details;
//Account User limit - (จำนวน)
//Number of Users - (จำนวน)
//Available - (จำนวน)
//Upgrade Account (ปุ่ม)
        }
        ?>
        <p></p>
        <p></p>
        <p></p>
        <h3>
            <span><?php echo JText::_('Storage Space')?></span>
        </h3>
    </div>
</div>